feat(tui): paste primary selection on middle click - #44938
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs FoundPR #32370: feat(tui): add linux_clipboard_selection config for primary buffer support
PR #6370: fix: enable primary clipboard copy for Wayland/X11 to fix Linux middle-click paste
PR #44443: feat(tui): add selection to prompt as quoted context
I recommend reviewing PR #32370 and #6370 to ensure PR #44938 doesn't duplicate existing work or conflicts with prior clipboard/selection implementations. |
|
Thanks for tracking these down. To disentangle them — they're not really duplicates of each other, they're the different halves of the same feature:
So #32370 isn't duplicating #44938 or #44443 at all — the only overlap is #6370's write path, which it extends rather than repeats. Happy to merge in #44938's middle-click dispatch if/when the write side lands; the Fwiw, current |
Summary
readPrimary()to the clipboard module (wl-paste → xclip → xsel fallback chain) and exposes it as an optionalreadPrimarymethod onClipboardServiceprompt.paste.primarycommand in the prompt and dispatches it from the app root on middle-button mouse down; copy-on-select mouse-up is skipped for middle button so it doesn't clobber the clipboardTest plan
bun testin packages/tui (new tests forreadPrimaryCommandfallbacks)bun typecheckin packages/tui